package com.example.qxfw.backgroundManagement.controller;

import com.example.qxfw.backgroundManagement.service.AgriculturalMonitoringService;
import com.example.qxfw.common.SysResult;
import com.example.qxfw.common.entity.AgriMonitor;
import com.example.qxfw.common.entity.GroupInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZeLin Wang
 * @version 1.0
 * @description: 监控管理-农情监控
 * @date 2024/7/4 9:44
 */
@Slf4j
@Api(tags = "监控管理-农情监控")
@RestController
@CrossOrigin
@RequestMapping("/agriculturalMonitoring")
public class AgriculturalMonitoringController {

    @Autowired
    private AgriculturalMonitoringService agriculturalMonitoringService;

    @ApiOperation("初始化组群列表")
    @GetMapping(value = "selectAgriMonitorInfo")
    public SysResult selectAgriMonitorInfo() {
        List<AgriMonitor> agriMonitorInfos = this.agriculturalMonitoringService.selectAgriMonitorInfo();
        return SysResult.success(agriMonitorInfos);
    }

}